-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added a new until
property to any
event consumption strategies
#997
base: main
Are you sure you want to change the base?
Added a new until
property to any
event consumption strategies
#997
Conversation
Signed-off-by: Charles d'Avernas <[email protected]>
@matthias-pichler Any suggestion on how to achieve the following in a brief, concise fashion?
|
- type: string | ||
title: AnyEventUntilCondition | ||
description: A runtime expression condition evaluated after consuming an event and which determines whether or not to continue listening. | ||
- $ref: '#/$defs/eventConsumptionStrategy' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understood correctly, we would have to create a new EventConsumption
type here to avoid the infinity mirror effect. 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Precisely!!!
items: | ||
$ref: '#/$defs/eventFilter' | ||
required: [ any ] | ||
oneOf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of a oneOf
we could use the if
then
feature of json schema which would allows us to still validate that until
is required when any
is empty but only generate on type/class instead of two
- callDoctor: | ||
listen: | ||
to: | ||
any: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we should test the schema by adding a failing example (under .ci/validation/test/fixtures/failing) where any
is empty and until
missing
Hmm we could do it with until:
oneOf:
- type: string
- allOf:
- $ref: #/$defs/eventConsumptionStrategy
- type: object
properties:
until: false |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Please specify parts of this PR update:
Discussion or Issue link:
Closes #992
What this PR does:
Added a new
until
property toany
event consumption strategiesAdditional information:
We need to find a smart way to forbid an
until
event consumption strategy to itself define theuntil
property.